package com.pb.camera.adapter;

import java.util.ArrayList;
import java.util.List;

import com.pb.camera.R;
import com.pb.camera.more.detail.BaseSetFragment;

import android.content.Context;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;

public class SettingFragmentAdapter extends FragmentStatePagerAdapter{
	

	private static String[]  mSettingName;
    private Context mComtext;
	private List<BaseSetFragment> mListFragment;

	public SettingFragmentAdapter(FragmentManager fm,Context context) {
		super(fm);
		this.mComtext = context;
		mSettingName = new String[]{mComtext.getString(R.string.show_set),mComtext.getString(R.string.device_set),
									mComtext.getString(R.string.move_detect_set)};
		mListFragment = new ArrayList<BaseSetFragment>();
 	}
	
	public Fragment getItem(int index) {
		// TODO Auto-generated method stub
		return mListFragment.get(index);
	}

	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return mSettingName.length;
	}
	@Override
	public CharSequence getPageTitle(int position) {
		// TODO Auto-generated method stub
		return mSettingName[position];
	}
	public void setListFragment(List<BaseSetFragment> listFragment) {
		this.mListFragment = listFragment;
	}
}
